import 'package:flutter/services.dart';
import 'package:shared_preferences/shared_preferences.dart';

// 数据存储
class SharedPreferencesUtil {
  static String _userDefaultChannel = "yuanxin.flutter.io/user_default";

  static saveObjc(String key, String value) async {
    MethodChannel(_userDefaultChannel)
        .invokeMethod('setObjc', {'key': key, 'value': value});
  }

  static Future getObjc(String key) async {
    return MethodChannel(_userDefaultChannel)
        .invokeMethod('getObjc', {'key': key});
  }
}
